import request from '@/utils/request'

// 查询销售订单明细列表
export function listSaleOrderdetail(query) {
  return request({
    url: '/sale/saleOrderdetail/list',
    method: 'get',
    params: query
  })
}

// 查询销售订单明细详细
export function getSaleOrderdetail(id) {
  return request({
    url: '/sale/saleOrderdetail/' + id,
    method: 'get'
  })
}
// 根据订单号查询订单明细
export function listSaleOrderDetailByOrderNo(id) {
  return request({
    url: '/sale/saleOrderdetail/selectSaleOrderdetailByOrderNo/' + id,
    method: 'get'
  })
}

// 新增销售订单明细
export function addSaleOrderdetail(data) {
  return request({
    url: '/sale/saleOrderdetail',
    method: 'post',
    data: data
  })
}

// 修改销售订单明细
export function updateSaleOrderdetail(data) {
  return request({
    url: '/sale/saleOrderdetail',
    method: 'put',
    data: data
  })
}

// 删除销售订单明细
export function delSaleOrderdetail(id) {
  return request({
    url: '/sale/saleOrderdetail/' + id,
    method: 'delete'
  })
}
